﻿using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;

namespace AskpldtUHW.Models
{
    public class ASKPLDTV2 : DbContext
    {
        public ASKPLDTV2()
            : base("ASKPLDT_V2")
        {
            //Database.SetInitializer(new DropCreateDatabaseIfModelChanges<ASKPLDTV2>());
        }

        public DbSet<SSC> SSCs { get; set; }
        public DbSet<Directory> Directorys { get; set; }
        //public DbSet<People> People { get; set; }
        //public DbSet<BalanceInquiry> BalanceInquirys { get; set; }
        protected override void  OnModelCreating(DbModelBuilder modelBuilder)
        {
 	        base.OnModelCreating(modelBuilder);

            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();

            modelBuilder.Entity<SSC>().ToTable("dbo.Ssc");
            modelBuilder.Entity<SSC>().Property(a => a.sscidPK);

            modelBuilder.Entity<Directory>().ToTable("dbo.Directory");
            modelBuilder.Entity<Directory>().Property(b => b.directoryidPK);
        }
    }
}